﻿using System;
using System.Collections.Generic;
using System.Web.Security;
using System.Web;
using System.Web.Security;

namespace Core.Model
{
    public class User//:Model
    {
        public virtual Guid Id { get; protected set; }
        public virtual IList<QuestionList> MyQuestionLists { get; set; }
        public virtual IList<Answer> Answers { get; set; } 

        public virtual string UserName { get; set; }
        public virtual string Email { get; set; }
       // public string Role { get; set; } 

        public virtual Guid MembershipUserGuid { get; set; }

        public User(Guid membershipUserGuid, IList<QuestionList> myQuestionLists, IList<Answer> answers)
        {
            MembershipUserGuid = membershipUserGuid;
            var user = Membership.GetUser(MembershipUserGuid);
            UserName =  user.UserName;
            Email = user.Email;
           // Role = Roles.GetRolesForUser(UserName)[0];            
            MyQuestionLists = myQuestionLists;
            Answers = answers;
        }

        public User()
        {
            MyQuestionLists = new List<QuestionList>();
            Answers = new List<Answer>();
        }
    }
}
